﻿package 
{

	import flash.display.Sprite;
	import flash.media.Sound;
	import flash.events.Event;
	import flash.net.URLRequest;


	public class Player extends Sprite
	{
		private var sound:Sound = new Sound  ;
		private var url:URLRequest = new URLRequest  ;


		public function Player()
		{
			sound.addEventListener(Event.COMPLETE, loaded);
			url = new URLRequest("http://translate.google.com.vn/translate_tts?tl=en&q=nice-to-meet-you");
			sound.load(url);
		}

		private function loaded(event:Event):void
		{
			sound.play(0,1);
		}


	}


}